home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / msg_limits.h.z / msg_limits.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.6 KB  |  89 lines

  1. /* $Id: msg_limits.h,v 1.13 1999/02/23 11:42:58 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_MSG_LIMITS_H__
  25. #define __GLIBTOP_MSG_LIMITS_H__
  26.  
  27. #include <glibtop.h>
  28. #include <glibtop/global.h>
  29.  
  30. BEGIN_LIBGTOP_DECLS
  31.  
  32. #define GLIBTOP_IPC_MSGPOOL    0
  33. #define GLIBTOP_IPC_MSGMAP    1
  34. #define GLIBTOP_IPC_MSGMAX    2
  35. #define GLIBTOP_IPC_MSGMNB    3
  36. #define GLIBTOP_IPC_MSGMNI    4
  37. #define GLIBTOP_IPC_MSGSSZ    5
  38. #define GLIBTOP_IPC_MSGTQL    6
  39.  
  40. #define GLIBTOP_MAX_MSG_LIMITS    7
  41.  
  42. typedef struct _glibtop_msg_limits    glibtop_msg_limits;
  43.  
  44. struct _glibtop_msg_limits
  45. {
  46.     u_int64_t    flags,
  47.         msgpool,    /* GLIBTOP_IPC_MSGPOOL    */
  48.         msgmap,        /* GLIBTOP_IPC_MSGMAP    */
  49.         msgmax,        /* GLIBTOP_IPC_MSGMAX    */
  50.         msgmnb,        /* GLIBTOP_IPC_MSGMNB    */
  51.         msgmni,        /* GLIBTOP_IPC_MSGMNI    */
  52.         msgssz,        /* GLIBTOP_IPC_MSGSSZ    */
  53.         msgtql;        /* GLIBTOP_IPC_MSGTQL    */
  54. };
  55.  
  56. #define glibtop_get_msg_limits(msg)    glibtop_get_msg_limits_l(glibtop_global_server, msg)
  57.  
  58. #if GLIBTOP_SUID_MSG_LIMITS
  59. #define glibtop_get_msg_limits_r    glibtop_get_msg_limits_p
  60. #else
  61. #define glibtop_get_msg_limits_r    glibtop_get_msg_limits_s
  62. #endif
  63.  
  64. void glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf);
  65.  
  66. #if GLIBTOP_SUID_MSG_LIMITS
  67. void glibtop_init_msg_limits_p (glibtop *server);
  68. void glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf);
  69. #else
  70. void glibtop_init_msg_limits_s (glibtop *server);
  71. void glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf);
  72. #endif
  73.  
  74. #ifdef GLIBTOP_NAMES
  75.  
  76. /* You need to link with -lgtop_names to get this stuff here. */
  77.  
  78. extern const char *glibtop_names_msg_limits [];
  79. extern const unsigned glibtop_types_msg_limits [];
  80. extern const char *glibtop_labels_msg_limits [];
  81. extern const char *glibtop_descriptions_msg_limits [];
  82.  
  83. #endif
  84.  
  85. END_LIBGTOP_DECLS
  86.  
  87. #endif
  88.  
  89.